package com.dcrzl.shcz.module.info.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;

import com.dcrzl.shcz.common.entity.info.UserGov;
import com.dcrzl.shcz.common.mapper.info.UserGovMapper;
import com.dcrzl.shcz.common.service.impl.BaseServiceImpl;
import com.dcrzl.shcz.common.utils.PageInfo;
import com.dcrzl.shcz.common.utils.Result;
import com.dcrzl.shcz.common.utils.SysConstant;
import com.dcrzl.shcz.module.info.service.UserGovService;
import org.springframework.stereotype.Service;

import java.io.Serializable;
import java.util.List;

@Service("userGovService")
public class UserGovServiceImpl extends BaseServiceImpl<UserGovMapper, UserGov> implements UserGovService {


    @Override
    public Result<UserGov> selectOne(UserGov userGov) {
        LambdaQueryWrapper<UserGov> wrapper = new LambdaQueryWrapper<>();
        return super.selectOne(wrapper);
    }

    @Override
    public Result<List<UserGov>> selectList(UserGov userGov) {
        LambdaQueryWrapper<UserGov> wrapper = new LambdaQueryWrapper<>();
        return super.selectList(wrapper);
    }

    @Override
    public PageInfo<UserGov> selectPage(UserGov userGov) {
        LambdaQueryWrapper<UserGov> wrapper = new LambdaQueryWrapper<>();
        return super.selectPage(userGov, wrapper);
    }

    @Override
    public Result<Integer> removeById(Serializable id) {
        UserGov userGov = new UserGov().setStatus(SysConstant.DATA_DELETE_STATUS)
                .setId((Long) id);
        return this.updateById(userGov);
    }

}